<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	    		xmlns:ui="http://java.sun.com/jsf/facelets"
	  			xmlns:h="http://java.sun.com/jsf/html"
	  			xmlns:f="http://java.sun.com/jsf/core"
                xmlns:sf="http://www.springframework.org/tags/faces"
                xmlns:cs="http://myfaces.apress.com/custom"
				template="/WEB-INF/layouts/standard.xhtml"
				xmlns:a4j="http://richfaces.org/a4j"
				xmlns:rich="http://richfaces.org/rich"
				xmlns:c="http://java.sun.com/jstl/core">


	<ui:define name="content">	
	
		
		<div>
			<h:form id="${model}form">
				
				<div>Hello</div>
				
					<div class="field">
						<div class="label">First Name:</div>
						<div class="input">
							<sf:clientTextValidator required="true">
								<h:inputText required="true" requiredMessage="First Name is required !" id="fname" value="#{admission.patient.firstName}">
									<rich:beanValidator />
								</h:inputText>
							</sf:clientTextValidator>						
						</div>
					</div>
				
			</h:form>
		</div>
		
		<div>
			
			<a4j:outputPanel id="attendentFragment">

				<h:form id="attendents">
					<rich:dataTable id="addAttendentArea" value="${attendents}" var="aBean">
						<rich:column>
							<f:facet name="header">
								<h:outputText value="Delete" />
							</f:facet>
							<h:commandButton immediate="true" value="Delete"  action="deleteAttendent"/>
						</rich:column>
						<rich:column>
							<f:facet name="header">Name</f:facet>
							<h:outputText value="#{aBean.name}"/>
						</rich:column>
					</rich:dataTable>			
					
					<div class="buttonGroup">
						<a4j:commandButton id="addAttendentBtn" reRender="#{flowRenderFragments}"  value="Add" action="addAttendent" />
					</div>
													
					
				</h:form>

			</a4j:outputPanel>
		</div>
		
		
	</ui:define>
</ui:composition>